package com.cw2.behavioral.visitor;

public class Disk extends Hardware{
    public Disk(String command) {
        super(command);
    }

    @Override
    void work() {
        System.out.println("disk保存指令历史记录" + command);
    }

    @Override
    void accept(Vistor vistor) {
        // 给磁盘提供一个升级指令
        vistor.visitDisk(this);
    }
}
